package org.boyan.modules.service.impl;

import org.boyan.entity.blood.TableInfo;
import org.boyan.modules.mapper.TableInfoDao;
import org.boyan.modules.service.TableInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TableInfoServiceImpl implements TableInfoService {
    @Autowired
    private TableInfoDao tableInfoDao;


    @Override
    public List<TableInfo> getTableInfoListByCriteria(int current, int size, TableInfo tableInfo) {
        int currentPage=(current-1)*size;
        return tableInfoDao.getTableInfoListByCriteria(currentPage,size,tableInfo);
    }

    @Override
    public int getTotalByCriteria(TableInfo tableInfo) {
        return tableInfoDao.getTotalByCriteria(tableInfo);
    }
}
